package com.dms.modules.product.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 商品评价
 */
@Data
@TableName("product_comment")
@ApiModel(value = "ProductComment", description = "商品评论")
public class ProductComment {
    
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("评论ID")
    private Long id;
    
    @ApiModelProperty("商品ID")
    private Long productId;
    
    @ApiModelProperty("订单ID")
    private Long orderId;
    
    @ApiModelProperty("用户ID")
    private Long userId;
    
    @ApiModelProperty("评分：1-5")
    private Integer rating;
    
    @ApiModelProperty("评论内容")
    private String content;
    
    @ApiModelProperty("评论图片，多个图片用逗号分隔")
    private String images;
    
    @ApiModelProperty("商家回复")
    private String reply;
    
    @ApiModelProperty("是否已回复：0-未回复 1-已回复")
    private Integer isReplied;
    
    @ApiModelProperty("点赞数")
    private Integer likeCount;
    
    @ApiModelProperty("状态：0-待审核 1-通过 2-拒绝")
    private Integer status;
    
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;
    
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;
    
    @TableLogic
    @ApiModelProperty("是否删除：0-未删除 1-已删除")
    private Integer deleted;
} 